import request from '@/utils/request'
import qs from 'qs'

export function saveUnform(data) {
  return request({
    url: '/manager/cap4/saveForm',
    method: 'post',
    data: qs.stringify(data)
  })
}

export function deleteFormById(id) {
  return request({
    url: `/manager/cap4/deleteFormById/${id}`,
    method: 'delete'
  })
}

export function getFormById(id) {
  return request({
    url: `/manager/cap4/getFormById/${id}`,
    method: 'get'
  })
}

export function pageForm(current, limit, userId, title) {
  return request({
    url: `/manager/cap4/pageForm/${current}/${limit}/${userId}`,
    method: 'get',
    params: { title }
  })
}



export function updateForm(data) {
  return request({
    url: `/manager/cap4/updateForm`,
    method: 'post',
    data: qs.stringify(data)
  })
}

